const koa = require('koa');
const wechat = require('./wechat-lib/middleware');
const config = require('./config/config')
const { reply } = require('./wechat/reply')


//申明一个  koa 实例
const app = new koa();

//加载认证中间件
//ctx 是koa 的应用上下文
//next 是串联中间件的钩子
app.use(wechat(config.wechat,reply))
//开启服务
app.listen(3006);
console.log('listen' + 3006)


























